import VueRouter from 'vue-router';
import Vue from 'vue';

import Home from "./components/Home.vue";
import ProductMenu from "./components/Menu/ProductMenu.vue";
import Owner from "./components/Owner.vue";
import Order from "./components/Order.vue";
import Login from "./components/Login/Login";
import PhoneArea from "./components/Login/PhoneArea";
import Protocal from "./components/Login/Protocal";
import PersonInfo from "./components/Owner/PersonInfo"
import Address from "./components/Address/Address"
import AddAddress from "./components/Address/AddAddress"
import EditAddress from "./components/Address/EditAddress"
import Pocket from "./components/Pocket/Pocket"
import Cart from "./components/Cart/Cart"
import GoodsDetail from "./components/Menu/GoodsDetail"
Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        component: Home
    },
    {
        path: '/home',
        component: Home
    },
    {
        path: '/menu',
        component: ProductMenu
    },
    {
        path: '/owner',
        component: Owner
    },
    {
        path: '/order',
        component: Order
    },
    {
        path: '/login',
        component: Login
    },
    {
        path: '/phoneArea',
        component: PhoneArea
    },
    {
        path: '/protocal',
        component: Protocal
    },
    {
        path: '/personInfo',
        component: PersonInfo
    },
    {
        path: '/address',
        component: Address
    },
    {
        path: '/addAddress',
        component: AddAddress
    },
    {
        path: '/editAddress',
        component: EditAddress
    },
    {
        path: '/pocket',
        component: Pocket
    },
    {
        path: '/cart',
        component: Cart
    },
    {
        path: '/goodsDetail/:id',
        component: GoodsDetail
    }
]
var router = new VueRouter({
    mode: 'history',
    routes
})
export default router